<script type="text/javascript" src="../Public/js/jquery.ajaxupload.js?1002"></script> 
<script type="text/javascript">
$(document).ready(function(){

simajax(APP+"/Member/mb_winersay_loadimg/id/{$id}","picList");

    new AjaxUpload('#winersay_upimg', {
        action: APP+'/Member/mb_winersay_upimg/id/{$id}',
        name: 'picfile',
        onSubmit : function(file , ext){
            if (ext && /^(jpg|png|jpeg|gif)$/.test(ext)){
                /* Setting data */
                this.setData({
                'ext': ext
                });
                this.disable();
            } else {
                return false;
            }

        },
        onComplete : function(file,response){
            mbsimajax(APP+"/Member/mb_winersay_loadimg/id/{$id}/","picList");
            this.enable();
        }
    });


    $.formValidator.initConfig({
        formid:"commentsform",
        validatorgroup:"commentsform"
    });

    $("#word").formValidator({
        validatorgroup:"commentsform"
    }).inputValidator({
        min:1,onerror:"感言不能为空,请确认"
    });

    $("#sendword").click(function(){
        var pass=$.formValidator.pageIsValid('commentsform');
        if(pass){
            var queryString = $('#commentsform').formSerialize();
            //alert(queryString);
            $.post(APP+"/Member/mb_winersay_save", queryString,function(msg){
                if(msg=='0'){ //先保留msg这个值以备以后使用
                    showtips('信息发表成功!请耐心等候我们审核加分','tips',1);
                    removeDialogbox("#winersay");
                }else{
                    showtips(msg,'tips',2);
                }
            });
        }
    });





//
$("#showPicDemo").click(function(){

    addDialogbox("#showPicDemoList","晒图样板",10003,860);  
    
    var msg ='<div class="tc" style="overflow-x:hidden; overflow-y:scroll; height:500px;">'+
             '<p><img width="640" height="480" src="../Public/images/showPicDemo1.jpg" /></p>'+
             '<p><img width="640" height="480" src="../Public/images/showPicDemo2.jpg" /></p>'+
             '<p><img width="640" height="480" src="../Public/images/showPicDemo3.jpg" /></p>'+
             '<p><img width="640" height="480" src="../Public/images/showPicDemo4.jpg" /></p>'+
             '<p style="margin:15px 0;">这是由{$Think.config.sysconfig.webname}提供的基本晒图样板，要是最后还能来一张靓照，分数肯定+++。</p>'+
             '</div>';
    $("#showPicDemoList .dialogboxContent").prepend(msg);

});



});
</script>


    <div class="content regWrap" style="display:block;">

        <h4 class="text">晒图格式</h4>
        <ul class="disc inside inputWrap">
            <li>至少有一张是{$Think.config.sysconfig.webname}标志和商品合影的图片，说明商品确实来自{$Think.config.sysconfig.webname}（可用包装或感谢信上的{$Think.config.sysconfig.webname}标志作为背景）；</li>
            <li>至少晒三张以上（抽时间晒多点好图就能打动审图GGMM哦）；</li>
            <li>图片宽在600像素以内，高不限，体积在100KB以内为佳，图片最佳格式为jpg，png；</li>
            <li>{$Think.config.sysconfig.webname}只认第一次晒图出现的为本尊，其他视为过客（俗称花瓶），本尊露脸需要和商品一起，否则无法判断真伪，本尊真人秀绝对加分；</li>
            <li>网上截图、PS或直接盗用他人晒图视为无效，直接不通过，力挺DIY（自己动手）。</li>
        </ul>
        
        
        <fieldset>
            <legend>已上传图片列表</legend>
            
            <ul id="picList" class="picList clearfix">
            </ul>
            
           <p class="cb">
                <span class="button space">
                    <span class="first-child">
                       
                        <button type="button" id="winersay_upimg">点击上传照片</button>
                    </span>
                </span>
            </p>
                        
        </fieldset>

        <fieldset>
            <legend>怎么也有几句感言吧？</legend>
            <form id="commentsform">
            <div class="newComment paragraph">
    
                <p class="inputWrap">
                <textarea id="word" name="word" class="textarea" style="width:100%; height:100px;"></textarea>
                </p>
            </div>
            
                        <p>
                <span class="button space">
                    <span class="first-child">
                        <button type="button" id="sendword">全部写好了，发表</button>
                    </span>
                </span>
            </p>
            <input id="id" name="id" value="{$id}" type="hidden" />
                        
            </form>
        </fieldset>
    </div>